<template>
  <div id="app">
    <img src="./assets/logo.png">
    {{isShow}}
    <myslot>
      <h1 slot="head">我是外面的头部</h1>
      <p v-if="isShow" @click="change">我外面的body</p>
      <div slot="fooder">我是外面的尾部</div>
    </myslot>
    <div>我是增加的视频屏蔽</div>
    <router-view></router-view>
    <div>收集用用户信息</div>
  </div>
</template>
<script>
import myslot from './pages/slot.vue'
import axios from 'axios'
var Mock = require('mockjs')
// var data = Mock.mock({
//  'list|1-10': [{
//    'id|+1': 2
//  }]
// })
var data2 = Mock.mock({
  'name|0-10': 'wo'}
)
Mock.mock('url', {
  'list|1-10': [{
    'id|+1': 1,
    'email': '@EMAIL'
  }]
})

axios.get('url').then(res => {
  console.log('里面的数据', res.data)
})
console.log(JSON.stringify(data2, null, 4))
export default {
  name: 'app',
  components: {
    myslot
  },
  data () {
    return {
      isShow: true
    }
  },
  methods: {
    change () {
      this.isShow = !this.isShow
    }
  }
}
</script>

<style>
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
